<template>
  <div class="registerContainer">
    <h1>DreamCars -- {{ msg }}</h1>
    <button @click="FetchData">HONDA</button>
    <dir style="width: 200px" class="ellipsis-line-2">学好Vue 万事不用愁</dir>
    <div class="mingde" style="border: 1px solid skyblue; width: 260px; height: 100px">
      读专业 上明德 一座专业的培训
    </div>
  </div>
</template>

<script >
import { getData } from "@/api/api2.js";
import commonMixin from "@/mixin/index";
console.log(getData);

export default {
  data() {
    return {
      msg: "by your dream - 比亚迪唐DM-i",
    };
  },
  created() {
    console.log("register-created");
    this.hello();
    this.hi();
  },
  methods: {
    async FetchData() {
      this.msg = "广本凌派";
      let data = await getData();
      console.log(data);
    },
    hello() {
      console.log("来自于register.vue,this.msg");
    },
  },
  mixins: [commonMixin],
};
</script>

<style lang="scss" scoped>
$bgColor: skyblue;
.registerContainer {
  button {
    border-radius: 8%;
    background-color: red;
    box-shadow: 0 0 20px skyblue;
  }
}
</style>
